<div ng-controller="tagCtrl">
    <div class="bg-light lter b-b wrapper-md">
        <h4 class="m-n font-thin">标签管理</h4>
    </div>
    <div class="wrapper-md ng-scope">
        <div class="panel panel-default">
            <div class="row wrapper">
                <div class="col-sm-12">
                    <button class="btn btn-sm btn-info pull-right"  ui-sref="app.tagAdd">添加标签</button>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="table-responsive">
                <table class="table table-striped b-t b-light">
                    <thead>
                        <tr>
                            <th>标签名字</th>
                            <th>标签描述</th>
                            <th>服务类型</th>
                            <th>标签描述</th>
                            <th width="200" class="text-center">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in list">
                            <td>
                                <span class="h6">{{item.name}}</span>
                            </td>
                            <td><span class="h6">{{item.describe}}</span></td>
                            <td><span class="h6" ng-bind="{0:'标志',1:'活动',2:'服务',3:'承诺'}[item.target]"></span></td>
                            <td><span class="h6" ng-bind="{0:'商品',1:'店铺'}[item.type]"></span></td>
                            <td class="text-center">
                                <button class="btn btn-sm btn-info" ui-sref="app.tagEdit({id:item.id})">修改</button>
                                <button class="btn btn-sm btn-danger" ng-click="updateToDelete(item)">删除</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                    <span class="h6">~未搜索到任何数据~</span>
                </div>
                <div>
                    <circle-loading ng-if="app.loading"></circle-loading>
                </div>
            </div>
            <footer class="panel-footer">
                <div class="row">
                    <div class="col-sm-offset-4 col-sm-4 text-center">
                        <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                    </div>
                    <div class="col-sm-4 text-right text-center-xs">
                        <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage"
                                    ng-change="pageChanged()" max-size="{{maxPageRow}}" class="pagination-sm m-t-none m-b"
                                    previous-text="上一页" next-text="下一页"
                                    first-text="首页" last-text="尾页"></pagination>
                    </div>
                </div>
            </footer>
        </div>
    </div>
</div>